﻿using Microsoft.EntityFrameworkCore;
using Traceability.App.Domain;
using Traceability.App.Domain.养殖基本信息表;
using Traceability.App.Domain.屠宰信息表;
using Traceability.App.Domain.新文件夹;
using Traceability.App.Domain.深加工信息表;

namespace Traceability.App.Intrastructure
{
    public class MyDbContext : DbContext
    {
        private readonly DbContextOptions options;

        public MyDbContext(DbContextOptions options) : base(options)
        {
            this.options = options;
        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<HealthModel>().HasQueryFilter(x => !x.IsDel);
        }

        public DbSet<HealthModel> healthModels { get; set; }

        public DbSet<ProcessingCompanyModel> processingCompanyModels { get; set; }
        public DbSet<ProcessingModel> processingModels { get; set; }
        public DbSet<SupplierProfileModel> supplierProfileModels { get; set; }

        public DbSet<ShopModel> shopModels { get; set; }
        public DbSet<TraceabilityModel> traceabilityModels { get; set; }

        public DbSet<ImgModel> imgModels { get; set; }

        public DbSet<KillCompanyModel> killCompanyModels { get; set; }
        public DbSet<KillInformationModel> killInformationModels { get; set; }

        public DbSet<FarmCompanyModel> farmCompanyModels { get; set; }
        public DbSet<FarmModel> farmModels { get; set; }

        
    }
}
